package com.lechuang.common.result;

import lombok.Getter;

/**
 * <p>
 *  返回状态枚举类
 * </p>
 * @author liaoningbo
 * @since 2023/5/31
 */
@Getter
public enum ResultEnum {
    /**  */
    SUCCEED(200, "成功"),
    NO_LOGIN(401, "暂未登录或token已经过期"),
    NO_AUTH(403, "没有相关权限"),
    LOGIN_ERROR(402, "用户名或密码错误"),
    SENTINEL_ERROR(426, "限流了，稍后重试！"),
    ERROR(500, "失败"),
    PARAM_ERROR(510, "参数错误"),
    BUSINESS_ERROR(520, "业务异常"),
    ;

    private Integer code;
    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
